﻿using MDto;
using MIRepository;
using MIServices;

namespace MServices
{
    public class UserInfoServices:IUserInfoServices
    {
        private readonly IUserInfoRepository _rep;
        public UserInfoServices(IUserInfoRepository rep)
        {
            _rep = rep;
        }
        public UserInfoDto GetUserInfo()
        {
            var entity = _rep.GetUserInfo();
            UserInfoDto dto = new UserInfoDto {UserName = entity.UserName, Age = entity.Age, Address = entity.Address};
            return dto;
        }
    }
}
